﻿@model IEnumerable<StashyWeb.Models.SmackPair>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    
    @Html.ActionLink("Create New", "Edit")
</p>
<table>
    <tr>
        <th>
            Title
        </th>
        <th>
            Snippet1
        </th>
        <th>
            Snippet2
        </th>
        <th>
            NumVotesSnippet1
        </th>
        <th>
            NumVotesSnippet2
        </th>
        <th>
            Created
        </th>
        <th>
            Updated
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Snippet1)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Snippet2)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.NumVotesSnippet1)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.NumVotesSnippet2)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Created)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Updated)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
    </tr>
}

</table>
